package com.kcht.rd30.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kcht.rd30.dto.TimeType;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@Accessors(chain = true)
@TableName(value = "tb_reader_time_calibration")
@NoArgsConstructor
@AllArgsConstructor
public class TimeCalibrationEntity extends BaseInsertUpdateDateEntity{
    @TableId(type = IdType.AUTO)
    private Long id;
    /*阅读器ip,端口默认10006*/
    private String ip;
    @TableField("time_type")
    private TimeType timeType=TimeType.BJ;
    /*多长时间校准一次服务，单位为s，默认为30s*/
    private Integer duration=30;
    /*是否开启校准,0=false,1=true*/
    @TableField("is_cali")
    private Boolean isCali=true;
    /*最后一次校准的时间*/
    @TableField("last_calibration_time")
    private LocalDateTime lastCalibrationTime;
}
